//
//  ZJHongbaoTimeVC.m
//  这家测试项目
//
//  Created by IOS_DEVELOPER on 2017/7/14.
//  Copyright © 2017年 陈志凌. All rights reserved.
//

#import "ZJHongbaoTimeVC.h"
@interface ZJHongbaoTimeVC ()
@property (weak, nonatomic) IBOutlet UIButton *sureBtn;
@property (weak, nonatomic) IBOutlet UILabel *toptitle;

@end

@implementation ZJHongbaoTimeVC

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor colorWithWhite:0.f alpha:0.3];
  
    if (self.dateStr) {
       self.toptitle.text = @"本次红包倒计时";
        self.endTitle.hidden = YES;
        self.titleLabel.formatter = @"HH小时mm分ss秒";
        self.endTitle.hidden = YES;
        self.titleLabel.hidden = NO;
        [self.titleLabel countDownWithDate:self.dateStr];
        [self.titleLabel setCountDownLableChange:^(NSDate *startTime, double time, NSString *text) {}];
    }else{
        self.titleLabel.hidden = YES;
    }
}

- (IBAction)sureBtn:(UIButton *)sender {
    if (_delegate != nil) {
        [_delegate backRoot];
    }
     [self dismissViewControllerAnimated:YES completion:nil];
}

@end
